package camid.services.nodemanager;

import camid.distribution.protocol.Endpoint;
import camid.services.nameservice.INameService;
import camid.util.monitoring.NodeMetrics;

public interface INodeManager {

	INameService getNameService();

	void reportObjectCreation(String objectId, Class<?> entityClass);

	void reportObjectDestruction(String objectId);

	String getNodeId();

	void registerDefinition(Class<?> entityClass);

	Object getEntityData(String objectId);

	void addEntityData(String objectId, Object entity)
			throws InstantiationException, IllegalAccessException;

	Double getCpuUsage();

	Integer getNumberOfObjects();

	ObjectStatus getObjectStatus(String objectId);

	void migrateObject(String objectId, INodeManager otherNodeManager);

	Double getNodeCost();

	NodeMetrics getNodeMetrics();
	
	void migrateObjects(String nodeId, Integer quantity);

	void migrateObject(String objectId, Endpoint nodeEndpoint);

	void alert(Integer redirectCount);

	Boolean isUnderLoadAlert();

}